#ifndef SOCKETREADER_H
#define SOCKETREADER_H

#include <QTcpSocket>
QT_BEGIN_NAMESPACE
class QTcpSocket;
QT_END_NAMESPACE
#include<QMutex>
#include<QMutexLocker>
#include<QTimer>
#include<QDebug>

class TcpClient : public QObject
{
  Q_OBJECT

public:

  explicit TcpClient(QTcpSocket* socket);

  ~TcpClient();

  void startSocket();

public slots:
  void readMessage();

signals:
  void signalIsforclientInfo(QByteArray array);

private:

  QTcpSocket *m_socket = nullptr;

  bool flag = true;
};

#endif // SOCKETREADER_H
